/*
 clear .css file by nodejs 
*/
import React, { Component,  } from 'react'
import PropTypes from 'prop-types'


// 左侧带图标 
export default class ImageTextItems extends Component{
  static defaultProps = {
    arrow : false,
    ouTouch : ()=>{}
  };
  static propTypes = {
    text : PropTypes.string.isRequired,
    icon : PropTypes.string,
    arrow : PropTypes.bool,
    iconStyle : PropTypes.object,
    ouTouch : PropTypes.func,
  };
  render(){
    let { text, smallText, icon, arrow, iconStyle, ouTouch  } = this.props
    return (
        <div className="lwui_cell" onClick={ouTouch}>
          {
            icon ? (
              <div className="lwui_cell_hd">
                <img className="icon" src={icon} style={iconStyle} />
              </div>
            ):null
          }
          <div className="lwui_cell_bd lwui_cell_primary">
              <p>
                {text}
                { smallText ? (<span className="small_t">{smallText}</span>):null}
              </p>
              
          </div>
          <div className="lwui_cell_ft">
          </div>
          { arrow ? (<img className="nav-right" src="assets/images/icons/ic_list_arrow@2x.png" />):null}
        </div>
    )
  }
}














